//
//  HYNotification.m
//  zhongchuan
//
//  Created by yanghao on 9/7/16.
//  Copyright © 2016 huying. All rights reserved.
//

#import "HYNotification.h"

@implementation HYNotification
+ (void)removeAllNotification:(id)target
{
    [[NSNotificationCenter defaultCenter] removeObserver:target];
}

//登录成功
+(void)addLoginNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:LoginSuccessNotification
                                               object:nil];
    

}

+(void)postLoginNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter]postNotificationName:LoginSuccessNotification object:nil userInfo:userInfo];
}

//定位成功
+(void)addLocationNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:LocationSuccessNotification
                                               object:nil];
    
    
}

+(void)postLocationNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter]postNotificationName:LocationSuccessNotification object:nil userInfo:userInfo];
}

//定位失败
+(void)addLocationFailNotification:(id)target action:(SEL)action{    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                              selector:action
                                                                                                                  name:LocationFailNotification
                                                                                                                object:nil];
    
    
}

+(void)postLocationFailNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter]postNotificationName:LocationFailNotification object:nil userInfo:userInfo];
}

//定位更新
+(void)addLocationUpdateNotification:(id)target action:(SEL)action{    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                                selector:action
                                                                                                                    name:LocationUpdateNotification
                                                                                                                  object:nil];
    
    
}

+(void)postLocationUpdateNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:LocationUpdateNotification object:nil userInfo:userInfo];
}
//选择专业
+(void)addChooseMajorNotification:(id)target action:(SEL)action{    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                                selector:action
                                                                                                                    name:ChooseMajorNotification
                                                                                                                  object:nil];
    
    
}

+(void)postChooseMajorNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:ChooseMajorNotification object:nil userInfo:userInfo];
}

//保存提现当前账户
+(void)addGetMoneyNotification:(id)target action:(SEL)action{    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                             selector:action
                                                                                                                 name:GetMoneyNotification
                                                                                                               object:nil];
    
    
}

+(void)postGetMoneyNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:GetMoneyNotification object:nil userInfo:userInfo];
}
//更新消息状态
+(void)addUpdateMessageNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                          selector:action
                                                                                                              name:UpdateMessageNotification
                                                                                                            object:nil];
    
    
}

+(void)postUpdateMessageNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:UpdateMessageNotification object:nil userInfo:userInfo];
}

//支付宝支付结果
+(void)addLoadOrderRecordNotification:(id)target action:(SEL)action{    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                              selector:action
                                                                                                                  name:AddLoadOrderRecordNotification
                                                                                                                object:nil];
    
    
}

+(void)postLoadOrderRecordNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:AddLoadOrderRecordNotification object:nil userInfo:userInfo];
}


//添加上班时间
+(void)addWorkTimeResultNotification:(id)target action:(SEL)action{
    
    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                                 selector:action
                                                                                                                     name:AddWorkTimeResultNotification
                                                                                                                   object:nil];
}

+(void)postWorkTimeResultNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:AddWorkTimeResultNotification object:nil userInfo:userInfo];
}

//退出登录
+(void)addLogOutNotification:(id)target action:(SEL)action
{
                               [[NSNotificationCenter defaultCenter] addObserver:target
                                                                            selector:action
                                                                                                                     name:LogOutNotification
                                                                                                                   object:nil];
}

+(void)postLogOutNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:LogOutNotification object:nil userInfo:userInfo];
}


//更新预约记录数据
+(void)addUpdateOrderReocrdNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:UpdateOrderReocrdNotification
                                               object:nil];
    
    
}

+(void)postUpdateOrderReocrdNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:UpdateOrderReocrdNotification object:nil userInfo:userInfo];
}



//更新语音通话用户头像
+(void)addUpdateCallUserHeadImgNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:UpdateCallUserHeadImgNotification
                                               object:nil];
    
    
}

+(void)postUpdateCallUserHeadImgNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:UpdateCallUserHeadImgNotification object:nil userInfo:userInfo];
}

//登录失效
+(void)addLoginOverdueNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:LoginOverdueNotification
                                               object:nil];
    
    
}

+(void)postLoginOverdueNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:LoginOverdueNotification object:nil userInfo:userInfo];
}

//通知我的页面为登录状态
+(void)addMineShowLoginBtnNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:MineShowLoginBtnNotification
                                               object:nil];
    
    
}

+(void)postMineShowLoginBtnNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:MineShowLoginBtnNotification object:nil userInfo:userInfo];
}

//支付宝支付结果
+(void)addAliPayResultNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:AliPayResultNotification
                                               object:nil];
    
    
}

//通知刷新我的页面
+(void)addReloadMineNotification:(id)target action:(SEL)action{
    [[NSNotificationCenter defaultCenter] addObserver:target
                                             selector:action
                                                 name:ReloadMineNotification
                                               object:nil];
    
    
}

+(void)postReloadMineNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:ReloadMineNotification object:nil userInfo:userInfo];
}


+(void)postAliPayResultNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:AliPayResultNotification object:nil userInfo:userInfo];
}

//微信支付结果
+(void)addWeixinPayResultNotification:(id)target action:(SEL)action{    [[NSNotificationCenter defaultCenter] addObserver:target
                                                                                                                 selector:action
                                                                                                                     name:WeixinPayResultNotification
                                                                                                                   object:nil];
}

+(void)postWeixinPayResultNotification:(NSDictionary *)userInfo{
    [[NSNotificationCenter defaultCenter] postNotificationName:WeixinPayResultNotification object:nil userInfo:userInfo];
}
@end
